From: Juri Linkov Date: Sun, 19 Jul 2009 16:56:05 +0000 (+0000) Subject: (describe-variable): Add information about file-local and dir-local variables. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~11394 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b7df816aaa18397d70ee1f0628cd06fb84e8fb3d;p=emacs.git (describe-variable): Add information about file-local and dir-local variables. --- diff --git a/lisp/help-fns.el b/lisp/help-fns.el index cbc140255e0..d45976cc8dc 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -710,6 +710,18 @@ it is displayed along with the global value." (use (format ";\n use `%s' instead." (car obsolete))) (t "."))) (terpri)) + + (when (member (cons variable val) file-local-variables-alist) + (setq extra-line t) + (if (member (cons variable val) dir-local-variables-alist) + (let ((file (and (buffer-file-name) + (not (file-remote-p (buffer-file-name))) + (dir-locals-find-file (buffer-file-name))))) + (princ " This variable is a directory local variable") + (if file (princ (concat "\n from the file \"" file "\""))) + (princ ".\n")) + (princ " This variable is a file local variable.\n"))) + (when safe-var (setq extra-line t) (princ " This variable is safe as a file local variable ")